package com.ll.mybaits.controller;

import com.ll.mybaits.bean.Employee;
import com.ll.mybaits.service.EmployeeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

import java.util.List;
import java.util.Map;

/**
 * 2020/9/23 - 10:46
 */
@Controller
public class EmployeeController {
    @Autowired
    EmployeeService employeeService;

    @RequestMapping("/getemps")
    public String emps(Map<String, Object> map){
        List<Employee> emps = employeeService.getEmpsService();
        map.put("allEmps", emps);

        return "list";
    }
}
